import xadmin
from xadmin import views
from .models import Grade,GradeStudent
from .models import VerifyCode
"""
CREATE DATABASE Mxonline DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
"""


class GlobalSettings(object):
    site_title = "金狗教育"
    site_footer = "jingou_edu"
    menu_style = "accordion"


class BaseSetting(object):
    enable_themes = True
    use_bootswatch = True


class GradeAdmin:
    list_display = ["GradeName","teacher"]


class GradeStudentAdmin:
    list_display = ["grade","user"]


class VerifyAdmin:
    list_display = ["add_time","mobile","code"]




xadmin.site.register(Grade,GradeAdmin)
xadmin.site.register(GradeStudent,GradeStudentAdmin)
xadmin.site.register(views.BaseAdminView, BaseSetting)
xadmin.site.register(views.CommAdminView, GlobalSettings)
xadmin.site.register(VerifyCode,VerifyAdmin)